;
(function () {
    System.register(['./index-legacy-BBSVeb5I.js'], function (exports, module) {
        'use strict';

        var defineComponent, mergeModels, useModel, computed, createBlock, Teleport, createBaseVNode, normalizeClass,
            normalizeStyle, unref, renderSlot, openBlock;
        return {
            setters: [function (module) {
                defineComponent = module.d;
                mergeModels = module.J;
                useModel = module.m;
                computed = module.f;
                createBlock = module.c;
                Teleport = module.a7;
                createBaseVNode = module.b;
                normalizeClass = module.n;
                normalizeStyle = module.H;
                unref = module.u;
                renderSlot = module.I;
                openBlock = module.o;
            }],
            execute: function execute() {
                var _sfc_main = exports("_", /* @__PURE__ */defineComponent({
                    __name: "SimpleDrawer",
                    props: /* @__PURE__ */mergeModels({
                        direction: {
                            default: "right"
                        },
                        notCloseOnClick: {
                            type: Boolean
                        }
                    }, {
                        "modelValue": {
                            type: Boolean
                        },
                        "modelModifiers": {}
                    }),
                    emits: ["update:modelValue"],
                    setup: function setup(__props) {
                        var props = __props;
                        var modelValue = useModel(__props, "modelValue");
                        var positionClass = computed(function () {
                            switch (props.direction) {
                                case "bottom":
                                    return "bottom-0 left-0 right-0 border-t";
                                case "top":
                                    return "top-0 left-0 right-0 border-b";
                                case "left":
                                    return "bottom-0 left-0 top-0 border-r";
                                case "right":
                                    return "bottom-0 top-0 right-0 border-l";
                                default:
                                    return "";
                            }
                        });
                        var transform = computed(function () {
                            switch (props.direction) {
                                case "bottom":
                                    return "translateY(100%)";
                                case "top":
                                    return "translateY(-100%)";
                                case "left":
                                    return "translateX(-100%)";
                                case "right":
                                    return "translateX(100%)";
                                default:
                                    return "";
                            }
                        });
                        return function (_ctx, _cache) {
                            return openBlock(), createBlock(Teleport, {
                                to: "body"
                            }, [createBaseVNode("div", {
                                class: normalizeClass(["fixed inset-0 z-200", modelValue.value ? "" : "pointer-events-none"])
                            }, [createBaseVNode("div", {
                                class: normalizeClass(["absolute inset-0 transition-opacity duration-100 ease-out", modelValue.value ? "bg-dark/60" : "opacity-0"]),
                                onClick: _cache[0] || (_cache[0] = function ($event) {
                                    return _ctx.notCloseOnClick ? null : modelValue.value = false;
                                })
                            }, null, 2), createBaseVNode("div", {
                                class: normalizeClass(["absolute border border-base bg-base transition-all duration-100 ease-out", unref(positionClass)]),
                                style: normalizeStyle(modelValue.value ? {} : {
                                    transform: unref(transform)
                                })
                            }, [renderSlot(_ctx.$slots, "default")], 6)], 2)]);
                        };
                    }
                }));
            }
        };
    });
})();
